package mwn.droidbus.directions;


import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapView;

import java.util.ArrayList;



//draws entire route - straignt lines between all points in set of points that is route
// needs to be incorporated into droidbus class
//may just move this to the overlay and put in droidbus directly

public class drawing {

	public void drawPath(ArrayList<GeoPoint> navSet, MapView mv1) {
	       
	
	
	        try {
	        		        	            
	            GeoPoint gp2 = navSet.get(0);
	            GeoPoint gp1;
	
	            for (GeoPoint nextGP: navSet)    {      
	
	                gp1 = gp2;
	                gp2 = nextGP;
	
	                
	
	                   
	                mv1.getOverlays().add( new DirectionsOverlay(gp1, gp2) ); //draw line between two points
	                        
	                  
	                }
	                
	           
	        
	        
	        
	        } catch (NumberFormatException e) {
	            //fail cant draw
	        }//catch
	        
	        
	   
	    
	   
	}//drawpath

}
